home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / procssng / ccs / ccs-11tl.lha / lbl / xview / guidexv / gfm_stubs.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-14  |  3.1 KB  |  157 lines

  1. /*
  2.  * gfm_stubs.c - Notify and event callback function stubs.
  3.  * This file was generated by `gxv' from `gfm.G'.
  4.  */
  5.  
  6. #include <stdio.h>
  7. #include <sys/param.h>
  8. #include <sys/types.h>
  9. #include <xview/xview.h>
  10. #include <xview/panel.h>
  11. #include <xview/textsw.h>
  12. #include <xview/xv_xrect.h>
  13. #include <group.h>
  14. #include "gfm_ui.h"
  15.  
  16.  
  17. /*
  18.  * Global object definitions.
  19.  */
  20. gfm_popup_objects    *Gfm_popup;
  21.  
  22. #ifdef MAIN
  23.  
  24. /*
  25.  * Instance XV_KEY_DATA key.  An instance is a set of related
  26.  * user interface objects.  A pointer to an object's instance
  27.  * is stored under this key in every object.  This must be a
  28.  * global variable.
  29.  */
  30. Attr_attribute    INSTANCE;
  31.  
  32. main(argc, argv)
  33.     int    argc;
  34.     char    **argv;
  35. {
  36.     /*
  37.      * Initialize XView.
  38.      */
  39.     xv_init(XV_INIT_ARGC_PTR_ARGV, &argc, argv, NULL);
  40.     INSTANCE = xv_unique_key();
  41.     
  42.     /*
  43.      * Initialize user interface components.
  44.      * Do NOT edit the object initializations by hand.
  45.      */
  46.     Gfm_popup = gfm_popup_objects_initialize(NULL, NULL);
  47.     
  48.     
  49.     /*
  50.      * Turn control over to XView.
  51.      */
  52.     xv_main_loop(Gfm_popup->popup);
  53.     exit(0);
  54. }
  55.  
  56. #endif
  57.  
  58.  
  59. /*
  60.  * Event callback function for `popup'.
  61.  */
  62. Notify_value
  63. gfm_resize(win, event, arg, type)
  64.     Xv_window    win;
  65.     Event        *event;
  66.     Notify_arg    arg;
  67.     Notify_event_type type;
  68. {
  69.     gfm_popup_objects *ip = (gfm_popup_objects *) xv_get(win, XV_KEY_DATA, INSTANCE);
  70.     
  71.     fprintf(stderr, "gfm: gfm_resize: event %d\n", event_id(event));
  72.     
  73.     /* gxv_start_connections DO NOT EDIT THIS SECTION */
  74.  
  75.     /* gxv_end_connections */
  76.  
  77.     return notify_next_event_func(win, (Notify_event) event, arg, type);
  78. }
  79.  
  80. /*
  81.  * Notify callback function for `list'.
  82.  */
  83. int
  84. gfm_list_proc(item, string, client_data, op, event, row)
  85.     Panel_item    item;
  86.     char        *string;
  87.     Xv_opaque    client_data;
  88.     Panel_list_op    op;
  89.     Event        *event;
  90.     int        row;
  91. {
  92.     gfm_popup_objects *ip = (gfm_popup_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  93.     
  94.     switch(op) {
  95.     case PANEL_LIST_OP_DESELECT:
  96.         fprintf(stderr, "gfm: gfm_list_proc: PANEL_LIST_OP_DESELECT: %s\n",string);
  97.         break;
  98.  
  99.     case PANEL_LIST_OP_SELECT:
  100.         fprintf(stderr, "gfm: gfm_list_proc: PANEL_LIST_OP_SELECT: %s\n",string);
  101.         break;
  102.  
  103.     case PANEL_LIST_OP_VALIDATE:
  104.         fprintf(stderr, "gfm: gfm_list_proc: PANEL_LIST_OP_VALIDATE: %s\n",string);
  105.         break;
  106.  
  107.     case PANEL_LIST_OP_DELETE:
  108.         fprintf(stderr, "gfm: gfm_list_proc: PANEL_LIST_OP_DELETE: %s\n",string);
  109.         break;
  110.     }
  111.     
  112.     /* gxv_start_connections DO NOT EDIT THIS SECTION */
  113.  
  114.     /* gxv_end_connections */
  115.  
  116.     return XV_OK;
  117. }
  118.  
  119. /*
  120.  * Notify callback function for `file'.
  121.  */
  122. Panel_setting
  123. gfm_file_notify(item, event)
  124.     Panel_item    item;
  125.     Event        *event;
  126. {
  127.     gfm_popup_objects *ip = (gfm_popup_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  128.     char *    value = (char *) xv_get(item, PANEL_VALUE);
  129.     
  130.     fprintf(stderr, "gfm: gfm_file_notify: value: %s\n", value);
  131.     
  132.     /* gxv_start_connections DO NOT EDIT THIS SECTION */
  133.  
  134.     /* gxv_end_connections */
  135.  
  136.     return panel_text_notify(item, event);
  137. }
  138.  
  139. /*
  140.  * Notify callback function for `load'.
  141.  */
  142. void
  143. gfm_open(item, event)
  144.     Panel_item    item;
  145.     Event        *event;
  146. {
  147.     gfm_popup_objects *ip = (gfm_popup_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  148.     
  149.     fputs("gfm: gfm_open\n", stderr);
  150.     
  151.     /* gxv_start_connections DO NOT EDIT THIS SECTION */
  152.  
  153.     /* gxv_end_connections */
  154.  
  155. }
  156.  
  157.